/*
 * Generated by XDoclet - Do not edit!
 */
package hotel.interfaces;

/**
 * Primary key for Client.
 * @xdoclet-generated at ${TODAY}
 * @copyright The XDoclet Team
 * @author XDoclet
 * @version ${version}
 */
public class ClientPK
   extends java.lang.Object
   implements java.io.Serializable
{

   public java.lang.Integer DNI;

   public ClientPK()
   {
   }

   public ClientPK( java.lang.Integer DNI )
   {
      this.DNI = DNI;
   }

   public java.lang.Integer getDNI()
   {
      return DNI;
   }

   public void setDNI(java.lang.Integer DNI)
   {
      this.DNI = DNI;
   }

   public int hashCode()
   {
      int _hashCode = 0;
         if (this.DNI != null) _hashCode += this.DNI.hashCode();

      return _hashCode;
   }

   public boolean equals(Object obj)
   {
      if( !(obj instanceof hotel.interfaces.ClientPK) )
         return false;

      hotel.interfaces.ClientPK pk = (hotel.interfaces.ClientPK)obj;
      boolean eq = true;

      if( obj == null )
      {
         eq = false;
      }
      else
      {
         if( this.DNI != null )
         {
            eq = eq && this.DNI.equals( pk.getDNI() );
         }
         else  // this.DNI == null
         {
            eq = eq && ( pk.getDNI() == null );
         }
      }

      return eq;
   }

   /** @return String representation of this pk in the form of [.field1.field2.field3]. */
   public String toString()
   {
      StringBuffer toStringValue = new StringBuffer("[.");
         toStringValue.append(this.DNI).append('.');
      toStringValue.append(']');
      return toStringValue.toString();
   }

}
